package com.colortea.action.frontstage.utils.enums;


/**
* Created with sdywcd@gmail.com
* Author:sdywcd@gmail.com
* Date:15/7/23
* Time:下午5:34
* Note:枚举系统中的状态对象
**/
public class FrontEnums {
	/**
	 * 订单开票状态
	 * 
	 * @ClassName: OrderIsInvoice
	 * @Description: TODO(这里用一句话描述这个类的作用)
	 * @author jcchen
	 * @date 2015年2月17日 下午11:10:28
	 *
	 */
	public enum CartGoodsState {
		NEWADDTOCART_NUM("新加入购物车的商品","1"),
		DELETECARTGOODS("从购物中删除的商品","2"),
		HAVEVENORDER("已加入订单","3");
		private String name;
		private String state;
		public String getName() {
			return name;
		}
		public void setName(String name) {
			this.name = name;
		}
		
		public String getState() {
			return state;
		}
		public void setState(String state) {
			this.state = state;
		}
		private CartGoodsState(String name,String state){
			this.name=name;
			this.state=state;
		}
		public static String getName(String tag){
			for(CartGoodsState d:CartGoodsState.values()){
				if(d.getState().equals(tag)){
					return d.getName();
				}
			}
			return "";
		}
	}
	/**
	 * 订单创建类型标记
	 * @author sdywcd
	 *
	 */
	public enum OrderCreateTag{
		NORMAL("普通订单","1");
		private String name;
		private String state;
		public String getName() {
			return name;
		}
		public void setName(String name) {
			this.name = name;
		}
		
		public String getState() {
			return state;
		}
		public void setState(String state) {
			this.state = state;
		}
		private OrderCreateTag(String name,String state){
			this.name=name;
			this.state=state;
		}
		public static String getName(String tag){
			for(OrderCreateTag d:OrderCreateTag.values()){
				if(d.getState().equals(tag)){
					return d.getName();
				}
			}
			return "";
		}
	}
	
	/**
	 * 发货地址状态
	 * @author sdywcd
	 *
	 */
	public enum ShippingAddressStatus{
		BINDEDORDER("发货地址已绑定订单","1"),UNBINDORDER("发货地址未绑定订单","0"),OLDBINDEDORDER("发货地址已绑定过订单但失效","2");
		private String name;
		private String state;
		public String getName() {
			return name;
		}
		public void setName(String name) {
			this.name = name;
		}
		
		public String getState() {
			return state;
		}
		public void setState(String state) {
			this.state = state;
		}
		private ShippingAddressStatus(String name,String state){
			this.name=name;
			this.state=state;
		}
		public static String getName(String tag){
			for(OrderCreateTag d:OrderCreateTag.values()){
				if(d.getState().equals(tag)){
					return d.getName();
				}
			}
			return "";
		}
	}
	
	/**
	 * 发货地址发货状态
	 * @author sdywcd
	 *
	 */
	public enum ShippingAddressIssend{
		SENDED("已经发过","1"),UNSEND("未发过","0");
		private String name;
		private String state;
		public String getName() {
			return name;
		}
		public void setName(String name) {
			this.name = name;
		}
		
		public String getState() {
			return state;
		}
		public void setState(String state) {
			this.state = state;
		}
		private ShippingAddressIssend(String name,String state){
			this.name=name;
			this.state=state;
		}
		public static String getName(String tag){
			for(OrderCreateTag d:OrderCreateTag.values()){
				if(d.getState().equals(tag)){
					return d.getName();
				}
			}
			return "";
		}
	}
	

}
